package model;

import java.util.ArrayList;
import java.util.Date;

/**
 * 
 * Description: 民俗活动Activity的实体类。
 *  
 * @since  2009/2/22
 * @author ashen
 * 
 */
public class Activity extends Node{
	private Integer sightId;
	private ArrayList<Spot> spots;
	
	public Activity() {
		spots=new ArrayList<Spot>();
	}
	public Activity(Integer id, String name, String description,
			Date createDate, Integer ownerId) {
		super(id, name, description, createDate, ownerId);
		// TODO Auto-generated constructor stub
	}
	
	public Activity(Integer id, String name, String description,
			Date createDate, Integer ownerId, Integer sightId,
			ArrayList<Spot> spots) {
		super(id, name, description, createDate, ownerId);
		this.sightId = sightId;
		this.spots = spots;
	}
	
	public Activity(Node node) {
		setActivity(node);
	}
	
	public void setActivity(Node node){
		this.setCreateDate(node.getCreateDate());
		this.setDescription(node.getDescription());
		this.setId(node.getId());
		this.setName(node.getName());
		this.setOwnerId(node.getOwnerId());
	}
	
	public Integer getSightId() {
		return sightId;
	}
	public void setSightId(Integer sightId) {
		this.sightId = sightId;
	}
	public ArrayList<Spot> getSpots() {
		return spots;
	}
	public void setSpots(ArrayList<Spot> spots) {
		this.spots = spots;
	}
	
	public void addSpot(Spot spot){
		spots.add(spot);
	}
	
	
}
